import React from "react";
import { SquareGroup } from "@/core/SquareGroup";
import { SquareComp } from "./SquarePageViewer";
interface ISquareGroupProps {
  group?: SquareGroup;
}
const SquareGrouViewer: React.FC<ISquareGroupProps> = ({ group }) => {
  if (!group) return null;
  return (
    <>
      {group?.squares.map((sq, i) => (
        <SquareComp key={i} square={sq} />
      ))}
    </>
  );
};

export default SquareGrouViewer;
